home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
dev
/
lang
/
sbp3_1e.lzh
/
WRITELN.PL
< prev
next >
Wrap
Text File
|
1991-10-31
|
531b
|
18 lines
/* From the book PROLOG PROGRAMMING IN DEPTH
by Michael A. Covington, Donald Nute, and Andre Vellino.
Copyright 1988 Scott, Foresman & Co.
Non-commercial distribution of this file is permitted. */
/* WRITELN.PL */
/* If the argument is a list, display the elements */
/* one by one and start a new line after each. */
/* Otherwise display the argument and start a new line. */
writeln([]) :- !.
writeln([Head|Tail]) :- !, write(Head),nl,writeln(Tail).
writeln(Arg) :- write(Arg),nl.